package com.butang.utils;

import com.butang.Servce.Service;
import com.butang.project.Emp;
import com.butang.project.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * ClassName: EmpController
 * Package: com.butang.project
 * Description:
 *
 * @Author BuTang
 * @Create 2023/7/3 10:18
 * @Version 1.0
 */
@RestController
public class EmpController {

    @Autowired//运行时从ioc容器自动获取该类型对象
    private Service s;
    @RequestMapping("/listEmp")
    public Result list() {

        List<Emp> service = s.service();

        return Result.success(service);

    }
}
